/*
 * File:   uartsoftware.h
 * Author: Laurelindo
 *
 * Created on 21 Октябрь 2009 г., 0:20
 */

#ifndef _UARTSOFTWARE_H
#define	_UARTSOFTWARE_H

#include <avr/io.h>

#ifdef __cplusplus
extern "C" {
#endif

// ************** Definitions **************************
#define UARTTxOneBit    1	// for BaudRate = 490000, sysClock = 8 MHz

#define TxPin		PC4
#define UARTPort	PORTC
#define UARTDDR		DDRC
#define UARTPin		PINC
#define SET_TX_PIN( )	(UARTPort |=  (1<<TxPin))
#define CLEAR_TX_PIN( ) (UARTPort &= ~(1<<TxPin))
#define GET_RX_PIN( )	(UARTPin & (1<<RxPin))

// ================================ Variables ==================================

// ============================ Prototypes =====================================
void UARTInit (void);
void klPrintf(const char *S, ...);

#ifdef __cplusplus
}
#endif


#endif	/* _UARTSOFTWARE_H */

